<?php
//用户登录页面
include("common.inc.php");
InitGP(array("action","commit","user","password","auto_login")); //初始化变量全局返回

if(!empty($_USERS))dheader("index.php");//如果已经登录直接跳转到首页
if (!empty($commit) && $action="login") {
	//处理登录操作
	include(INC_PATH."/member.class.php");
	$m=new memberclass();
	$msg=$m->login($user,$password);
	if ($msg=="OK") {
		//登录成功自动跳转到首页
		$gotourl=get_cookie('_refer');
		$gotourl = empty($_GET['refer'])?rawurldecode($gotourl):$_GET['refer'];
		if (empty($gotourl)) {
			$gotourl="index.php";
		}
		//jumpurl($gotourl);
		//dheader($gotourl);//php跳转页面
		
		showmessage("登入成功!".$m->ucsynlogin,$gotourl,1);
	}else {
		$ERROR_MSG =$msg;	//用户显示错误提示
		
	}

}

include template('login');//包含输出指定模板


?>